home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 049a.dms / 049a.adf / SOURCE_CODE / AJC-DEMONSCROLLER.AMOS / AJC-DEMONSCROLLER.amosSourceCode next >
AMOS Source Code  |  1993-09-09  |  2KB  |  84 lines

  1. '
  2. '   The DEMON SCROLLER 
  3. '   By Andrew Campbell (Silly Names Inc) 
  4. '  
  5. '   This program will load an ASCII file (at the moment
  6. '   simply called "1.SCROLL" into the array SCRIPT (max 500 lines!)  
  7. '   and scroll it over a lowres backdrop (stored in bank 15 at the mo) 
  8. '    
  9. '
  10. '   Note : the backdrop MUST be only 8 colours or less.
  11. '          the text is LOWRES only but different fonts should be 
  12. '          very easy to incorporate. 
  13. '
  14. '
  15. '
  16. Dim SCRIPT$(500)
  17. Global SCRIPT$()
  18.  
  19. DEMONSCROLL["1.SCROLL"]
  20. Edit 
  21.  
  22. Procedure DEMONSCROLL[FILENAME$]
  23.  
  24. Unpack 15 To 0
  25.  
  26. Screen Open 1,320,290,8,Lowres
  27. Curs Off : Flash Off : Hide On 
  28. Cls 0
  29.  
  30. Wait Vbl 
  31.  
  32. Dual Playfield 0,1
  33. Dual Priority 1,0
  34. Screen 0
  35. A=$FFF
  36. Palette 0,,,,,,,,,A,A,A,A,A,A
  37.  
  38. Screen 1
  39.  
  40. Def Scroll 1,0,0 To 320,290,0,-1
  41. Pen 1 : Paper 0
  42. Ink 1,0
  43.  
  44. ' -----------------> Wipe script in case you've been here before!
  45.  
  46.    For I=1 To 500
  47.     SCRIPT$(I)=" "
  48.    Next I
  49.  
  50. ' -----------------> Open in the file to scroll
  51.  
  52.    Open In 1,Dir$+FILENAME$
  53.    Set Input 10,-1
  54.    I=0
  55.  
  56.    Repeat 
  57.       Inc I
  58.       Line Input #1,A$
  59.       SCRIPT$(I)=A$
  60.    Until Eof(1)
  61.  
  62. ' -----------------> Mark the end of the file with a "_" 
  63.  
  64.    SCRIPT$(I+3)="_"
  65.    Close 1
  66.  
  67. POS=0
  68.  
  69. ' ----------------> Keep on scrollin' until "_" is reached. Hmmm (etc) 
  70.  
  71. Repeat 
  72.  Inc POS
  73.  Text 0,270,Upper$(SCRIPT$(POS))
  74.  For I=1 To 9 : Wait Vbl : Scroll 1 : Next I
  75.  If Mouse Key : Repeat : Until Mouse Key=0 : End If 
  76. Until SCRIPT$(POS)="_"
  77.  
  78. ' ----------------> Fade off and close screens. As you do. 
  79.  
  80. Screen 0
  81. Fade 2 : Wait 30
  82. Screen Close 1 : Screen Close 0
  83.  
  84. End Proc